﻿<Quail:QuailUserControl x:Class="HelloWorld.Demo6.Demo6"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:Quail="clr-namespace:Quail.Silverlight.Controls;assembly=Quail.Silverlight"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Converters="clr-namespace:HelloWorld.Shared.Converters;assembly=HelloWorld.Shared" 
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
    <UserControl.Resources>
        <Converters:EnumConverter x:Key="EnumConverter" />
    </UserControl.Resources>
  <Quail:QuailGrid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="200"/>
            <RowDefinition Height="10"/>
            <RowDefinition Height="50"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>
            <Quail:QuailStackPanel Grid.Row="0" x:Name="Layout" Orientation="Vertical" HorizontalAlignment="Left">
            <TextBlock Text="What would you like to do today?" />
            <Quail:QuailRadioButton GroupName="todo"
                         Content="Nothing" 
                         x:Name="Nothing"
                         IsChecked="{Binding Path=Todo, Mode=TwoWay, Converter={StaticResource EnumConverter}, ConverterParameter=Nothing}"/>
            <Quail:QuailRadioButton GroupName="todo"
                         Content="Eat" 
                         x:Name="Eat"
                         IsChecked="{Binding Path=Todo, Mode=TwoWay, Converter={StaticResource EnumConverter}, ConverterParameter=Eat}"/>
            <Quail:QuailRadioButton GroupName="todo" 
                         Content="Sleep"
                         x:Name="Sleep"
                         IsChecked="{Binding Path=Todo, Mode=TwoWay, Converter={StaticResource EnumConverter}, ConverterParameter=Sleep}"/>
            <Quail:QuailRadioButton GroupName="todo"
                         Content="Drink"
                         x:Name="Drink"
                         IsChecked="{Binding Path=Todo, Mode=TwoWay, Converter={StaticResource EnumConverter}, ConverterParameter=Drink}"/>
            <Quail:QuailRadioButton GroupName="todo" 
                         Content="Be Merry"
                         x:Name="BeMerry"
                         IsChecked="{Binding Path=Todo, Mode=TwoWay, Converter={StaticResource EnumConverter}, ConverterParameter=BeMerry}"/>                         
            <Quail:QuailRadioButton GroupName="todo" 
                         x:Name="AllOfTheAbove"
                         Content="All of the above"
                         IsChecked="{Binding Path=Todo, Mode=TwoWay, Converter={StaticResource EnumConverter}, ConverterParameter=AllOfTheAbove}"/>
            <Quail:QuailButton x:Name="Doit" Click="Button_Click" Content="Do it!" Width="100" />
        </Quail:QuailStackPanel>

        <Quail:QuailStackPanel Grid.Row="2" Orientation="Vertical" VerticalAlignment="Top">
            <TextBlock x:Name="result" Text="{Binding Result}" />
        </Quail:QuailStackPanel>
    </Quail:QuailGrid>
</Quail:QuailUserControl>